Optimal. Leaf size=76 \[ \frac {3 x}{16}-\frac {3 \cos (2 a+2 b x) \sin (2 a+2 b x)}{32 b}-\frac {\cos (2 a+2 b x) \sin ^3(2 a+2 b x)}{16 b}-\frac {\sin ^5(2 a+2 b x)}{20 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4371, 2715, 8,
2644, 30} \begin {gather*} -\frac {\sin ^5(2 a+2 b x)}{20 b}-\frac {\sin ^3(2 a+2 b x) \cos (2 a+2 b x)}{16 b}-\frac {3 \sin (2 a+2 b x) \cos (2 a+2 b x)}{32 b}+\frac {3 x}{16} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 2644
Rule 2715
Rule 4371
Rubi steps
\begin {align*} \int \sin ^2(a+b x) \sin ^4(2 a+2 b x) \, dx &=\frac {1}{2} \int \sin ^4(2 a+2 b x) \, dx-\frac {1}{2} \int \cos (2 a+2 b x) \sin ^4(2 a+2 b x) \, dx\\ &=-\frac {\cos (2 a+2 b x) \sin ^3(2 a+2 b x)}{16 b}+\frac {3}{8} \int \sin ^2(2 a+2 b x) \, dx-\frac {\text {Subst}\left (\int x^4 \, dx,x,\sin (2 a+2 b x)\right )}{4 b}\\ &=-\frac {3 \cos (2 a+2 b x) \sin (2 a+2 b x)}{32 b}-\frac {\cos (2 a+2 b x) \sin ^3(2 a+2 b x)}{16 b}-\frac {\sin ^5(2 a+2 b x)}{20 b}+\frac {3 \int 1 \, dx}{16}\\ &=\frac {3 x}{16}-\frac {3 \cos (2 a+2 b x) \sin (2 a+2 b x)}{32 b}-\frac {\cos (2 a+2 b x) \sin ^3(2 a+2 b x)}{16 b}-\frac {\sin ^5(2 a+2 b x)}{20 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 62, normalized size = 0.82 \begin {gather*} \frac {120 b x-20 \sin (2 (a+b x))-40 \sin (4 (a+b x))+10 \sin (6 (a+b x))+5 \sin (8 (a+b x))-2 \sin (10 (a+b x))}{640 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 75, normalized size = 0.99
method | result | size |
default | \(\frac {3 x}{16}-\frac {\sin \left (2 x b +2 a \right )}{32 b}-\frac {\sin \left (4 x b +4 a \right )}{16 b}+\frac {\sin \left (6 x b +6 a \right )}{64 b}+\frac {\sin \left (8 x b +8 a \right )}{128 b}-\frac {\sin \left (10 x b +10 a \right )}{320 b}\) | \(75\) |
risch | \(\frac {3 x}{16}-\frac {\sin \left (2 x b +2 a \right )}{32 b}-\frac {\sin \left (4 x b +4 a \right )}{16 b}+\frac {\sin \left (6 x b +6 a \right )}{64 b}+\frac {\sin \left (8 x b +8 a \right )}{128 b}-\frac {\sin \left (10 x b +10 a \right )}{320 b}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 65, normalized size = 0.86 \begin {gather*} \frac {120 \, b x - 2 \, \sin \left (10 \, b x + 10 \, a\right ) + 5 \, \sin \left (8 \, b x + 8 \, a\right ) + 10 \, \sin \left (6 \, b x + 6 \, a\right ) - 40 \, \sin \left (4 \, b x + 4 \, a\right ) - 20 \, \sin \left (2 \, b x + 2 \, a\right )}{640 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.53, size = 67, normalized size = 0.88 \begin {gather*} \frac {15 \, b x - {\left (128 \, \cos \left (b x + a\right )^{9} - 336 \, \cos \left (b x + a\right )^{7} + 248 \, \cos \left (b x + a\right )^{5} - 10 \, \cos \left (b x + a\right )^{3} - 15 \, \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{80 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 434 vs.
\(2 (70) = 140\).
time = 6.71, size = 434, normalized size = 5.71 \begin {gather*} \begin {cases} \frac {3 x \sin ^{2}{\left (a + b x \right )} \sin ^{4}{\left (2 a + 2 b x \right )}}{16} + \frac {3 x \sin ^{2}{\left (a + b x \right )} \sin ^{2}{\left (2 a + 2 b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{8} + \frac {3 x \sin ^{2}{\left (a + b x \right )} \cos ^{4}{\left (2 a + 2 b x \right )}}{16} + \frac {3 x \sin ^{4}{\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )}}{16} + \frac {3 x \sin ^{2}{\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{8} + \frac {3 x \cos ^{2}{\left (a + b x \right )} \cos ^{4}{\left (2 a + 2 b x \right )}}{16} - \frac {57 \sin ^{2}{\left (a + b x \right )} \sin ^{3}{\left (2 a + 2 b x \right )} \cos {\left (2 a + 2 b x \right )}}{160 b} - \frac {109 \sin ^{2}{\left (a + b x \right )} \sin {\left (2 a + 2 b x \right )} \cos ^{3}{\left (2 a + 2 b x \right )}}{480 b} - \frac {\sin {\left (a + b x \right )} \sin ^{4}{\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )}}{10 b} - \frac {2 \sin {\left (a + b x \right )} \sin ^{2}{\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )} \cos ^{2}{\left (2 a + 2 b x \right )}}{5 b} - \frac {4 \sin {\left (a + b x \right )} \cos {\left (a + b x \right )} \cos ^{4}{\left (2 a + 2 b x \right )}}{15 b} + \frac {7 \sin ^{3}{\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )} \cos {\left (2 a + 2 b x \right )}}{160 b} + \frac {19 \sin {\left (2 a + 2 b x \right )} \cos ^{2}{\left (a + b x \right )} \cos ^{3}{\left (2 a + 2 b x \right )}}{480 b} & \text {for}\: b \neq 0 \\x \sin ^{2}{\left (a \right )} \sin ^{4}{\left (2 a \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 68, normalized size = 0.89 \begin {gather*} \frac {120 \, b x + 120 \, a - 2 \, \sin \left (10 \, b x + 10 \, a\right ) + 5 \, \sin \left (8 \, b x + 8 \, a\right ) + 10 \, \sin \left (6 \, b x + 6 \, a\right ) - 40 \, \sin \left (4 \, b x + 4 \, a\right ) - 20 \, \sin \left (2 \, b x + 2 \, a\right )}{640 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.68, size = 110, normalized size = 1.45 \begin {gather*} \frac {3\,x}{16}-\frac {-\frac {3\,{\mathrm {tan}\left (a+b\,x\right )}^9}{16}-\frac {7\,{\mathrm {tan}\left (a+b\,x\right )}^7}{8}+\frac {8\,{\mathrm {tan}\left (a+b\,x\right )}^5}{5}+\frac {7\,{\mathrm {tan}\left (a+b\,x\right )}^3}{8}+\frac {3\,\mathrm {tan}\left (a+b\,x\right )}{16}}{b\,\left ({\mathrm {tan}\left (a+b\,x\right )}^{10}+5\,{\mathrm {tan}\left (a+b\,x\right )}^8+10\,{\mathrm {tan}\left (a+b\,x\right )}^6+10\,{\mathrm {tan}\left (a+b\,x\right )}^4+5\,{\mathrm {tan}\left (a+b\,x\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________